﻿using System;

class MinimalAndMaximal
{
    static void Main(string[] args)
    {
        Console.Write("Please enter the length for the sequence: ");
        string consoleInput = Console.ReadLine();
        int n = int.Parse(consoleInput);
        int min = int.MaxValue;
        int max = int.MinValue;
        int element;
        
        for (int i = 1; i <= n; i++)
        {
            Console.Write("Please enter number [{0}] from the sequence: ",i);
            consoleInput = Console.ReadLine();
            element = int.Parse(consoleInput);
            if (max < element)
            {
                max = element;
            }
            if (min > element)
            {
                min = element;
            }
        }
        Console.WriteLine("Maximum: {0}", max);
        Console.WriteLine("Minimum: {0}", min);
    }
}

